/**
 * @description 商品订单表单接口
 * @author 骆子豪
 * @date 2025-07-19
 */

import request from '@/utils/request'

/**
 * @description 获取待发货的商品订单列表
 * @param {object} params - { currentPage, pageSize, queryFields: { consignee, mobilphone, address } }
 */
export const fetchGoodsOderFrom = (data) => {
  return request({
    url: '/dealer/pzMemberOrderM/getPzMemberOrderDPagesByDealerId',
    method: 'post',
    data,
  })
}

/**
 * @description 生成发货单
 */
export const generateDeliveryOrder = (data) => {
  return request({
    url: '/dealer/pzOrderSendM/newPzOrderSendM',
    method: 'post',
    data,
  })
}

/**
 * @description 订单发货接口
 */
export const postSendNow = (data) => {
  return request({
    url: '/dealer/pzOrderSendM/checkPzOrderSendM',
    method: 'post',
    data,
  })
}

/**
 * @description 获取快递公司列表
 */
export const getExpressCompanyList = (data) => {
  return request({
    url: '/dealer/pzKuaidi100/getPzKuaidi100KdgsPages',
    method: 'post',
    data,
  })
}

/**
 * @description 获取当前用户其他的订单
 */
export const getUserOtherOrders = (data) => {
  return request({
    url: '/dealer/pzMemberOrderM/getPzMemberOrderDListByMemberId',
    method: 'post',
    data,
  })
}
